<%@ page contentType="text/html;charset=GBK" %>

<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.misc.*" %>
<%//@ page import="com.ionglobal.misc.*" %>

<%@ include file="../init_include.jsp" %>

<%
	String temp = "";
	String sql = "";
	
	int pageid = 0;
	int pagerows = 10;
	int totalrows = 0;
	int totalpages = 1;
	String orderby = "id";
	String orderby2 = "asc";

	temp=request.getParameter("pageid");
	if( temp != null && temp.trim().length() > 0)
		pageid=Integer.parseInt(temp);

	temp=request.getParameter("orderby");
	if( temp != null && temp.trim().length() > 0)
		orderby=temp.trim();

	temp=request.getParameter("orderby2");
	if( temp != null && temp.trim().length() > 0)
		orderby2=temp.trim();
	
	temp=request.getParameter("pagerows");
	if( temp != null && temp.trim().length() > 0){
		pagerows = Integer.parseInt(temp);
		if( pagerows <=0 ) pagerows = 10;
		//session.setAttribute("pagerows",temp);
	}

	int parentid=0;
	temp=request.getParameter("parentid");
	if( temp != null && temp.trim().length() > 0)
		parentid = Integer.parseInt(temp.trim());

	String[] idarray = request.getParameterValues("id");
	
	for (int i=0;i<idarray.length;i++)
	{
		//sql = "delete from sys_zone where id= " + idarray[i];
		//dbi.execute( sql );
		sql += idarray[i] + ", ";
	}
	sql = sql.trim();
	sql = sql.substring(0, sql.length() - 1 );
	sql = "delete from sys_zone where id in (" + sql + ")";
	dbi.execute( sql );
  	response.sendRedirect("sys_zone_list.jsp" + "?parentid=" + parentid+"&pageid="+ pageid + "&ordery=" + orderby + "&orderby2=" + orderby2+  "&pagerows=" + pagerows  );
%>	
<%@ include file="../init_free.jsp" %>  
